<?php


namespace app\api\controller;


use app\common\controller\Api;
/**
 * 党员风采
 */
class PartyMemberFineStyle extends Api
{

    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 获取分页列表
     * @ApiMethod   (GET)
     * @param int $page
     * @param int $limit 数据条数
     */
    public function getPageList(\app\common\model\PartyMemberFineStyleModel $PartyMemberFineStyleModel)
    {
        $page = $this->request->request('page',1);
        $limit = $this->request->request('limit',5);
        $data = $PartyMemberFineStyleModel->getPageList($page,$limit);
        $this->result($data['msg'], $data['data'], $data['code']);
    }

    /**
     * 获取详情
     * @ApiMethod   (GET)
     * @param int $id
     */
    public function getDetail(\app\common\model\PartyMemberFineStyleModel $PartyMemberFineStyleModel)
    {
        $id = $this->request->request('id');
        if(!$id) {
            $this->result('参数错误',[],40001);
        }
        $data = $PartyMemberFineStyleModel->getDetail($id);
        $this->result($data['msg'], $data['data'], $data['code']);
    }

}